﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FAQFrameworks;
using FooFun.DataElements.Dtos;

namespace FooFun.Web.Controls
{
    public class EventListOfTopic : DataElementControl
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            // 提前一周
            DateTime time = DateTime.Now.AddDays(-7);
            Guid userId = FAQContext.Current.User.AccountId;
            if (userId != Guid.Empty)
            {
                TopicManager topicManager = new TopicManager();
                IDataElement de 
                    = topicManager.ListEventAboutCreater(userId, time);

                this.DataElement = de;
            }
            else
            {
                this.DataElement = new EmptyDataElement();
            }
        }
    }
}
